An Alternative Approach to Initializing Mutually Referential Objects
نویسنده
چکیده
Mutual dependencies between objects arise frequently in programs, and programmers must typically resort to manually filling “initialization holes” to help construct the corresponding object graphs, i.e. null values and/or explicitly mutable locations. This report describes a “base-line” proposal for a generalized form of value recursion in an ML-like language called initialization graphs, where value recursion is given the simplistic semantics of a graph of lazy computations whose nodes are sequentially forced, with uses of recursive values checked for initialization-soundness at runtime. We then develop examples using this mechanism to show how problematic the issue of value recursion is for ML-like languages, and in particular how sophisticated reactive objects cannot be defined in the language without using initialization holes, and how this forces ML programmers to break abstraction boundaries. At the same time we show how OO languages rely extensively on null pointers during initialization. We propose that a general, semi-safe mechanism allows value recursion to be used in conjunction with existing sophisicated abstract APIs such GUI libraries, and allows freshly defined APIs to be both abstract and yet not require clients to use explicit initialization holes. We propose that the initialization mechanism permits more programs to be expressed in the mutation-free fragment of ML, though we do not formally prove this result.
منابع مشابه
Initializing Mutually Referential Abstract Objects: The Value Recursion Challenge
Mutual dependencies between objects arise frequently in programs, and programmers must typically solve this value recursion by manually filling “initialization holes” to help construct the corresponding object graphs, i.e. null values and/or explicitly mutable locations. This paper aims to augment ongoing theoretical work on value recursion with a description of a semi-safe mechanism for a gene...
متن کاملObtaining referential word meanings from visual and distributional information: Experiments on object naming
We investigate object naming, which is an important sub-task of referring expression generation on real-world images. As opposed to mutually exclusive labels used in object recognition, object names are more flexible, subject to communicative preferences and semantically related to each other. Therefore, we investigate models of referential word meaning that link visual to lexical information w...
متن کاملPerspectives and the Referential Use of De nite Descriptions in Dialogue
This is an investigation into the pragmatics of the referential use of de nite descriptions. We examine situations where a speaker uses a description to induce a hearer to pick out a certain object from a set of mutually given objects, in order to state some proposition about this object. We ask for a criterion which provides the conditions for a successful use. It depends on the belief states ...
متن کاملA Piagetian approach to infant referential behaviors.
Near the end of the first year of life, infants begin producing referential behaviors that in adults indicate joint attention, or coordinating shared attention to an object with another person. These behaviors have been interpreted in the social cognitive literature as an indication that infants realize they are sharing attention to an object with another person. In this paper, we address theor...
متن کاملImage Segmentation and Shape Representation Using Deformable Surfaces 1
We present a technique for constructing shape representation from images using free-form deformable surfaces. An object is modelled as a closed surface that is deformed subject to attractive fields generated by input data points and features. Segmentation is achieved by initializing the surface at some location in the scene and by letting it deforms itself until it fits the input data. Surface ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2005